package utils

import (
	"strconv"

	"github.com/labstack/echo/v4"
)

func GetPagination(c echo.Context) (int, int) {
	
	page, _ := strconv.Atoi(c.QueryParam("page"))
	size, _ := strconv.Atoi(c.QueryParam("page_size"))

	if page <= 0 {
		page = 1
	}
	if size <= 0 {
		size = 10
	}

	return page, size
}